﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using RTNLip.Scripts;

namespace RTNLip
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private DataService dService = new DataService();
        private List<A> lstA = new List<A>();
        private void Form1_Load(object sender, EventArgs e)
        {
            //RTNSQLDataType rtnType = new RTNSQLDataType();
            //string strType = rtnType.getSqlStringType<string>();
            //MessageBox.Show(strType);


            //A[] aArrays = dService.AArrays;
            //foreach (A record in aArrays)
            //    MessageBox.Show("value1 : " + record.value1.ToString() + " value2 : " + record.value2.ToString());


            RTNDatabase rDatabase = new RTNDatabase();
            rDatabase.createTable<A>();

            //A a = new A();
            //a.value1 = 12;
            //a.value2 = 14;

            //rDatabase.setSingleRecord<A>(a);

            rDatabase.createTable<A>();

            for(int i =0; i < 5; i++)
            {
                A a = new A();
                a.value1 = i;
                a.value2 = i + 2;
                lstA.Add(a);
            }

            rDatabase.setRecord<A>(lstA.ToArray());
        }

    }
}
